﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewAll.ascx.cs" Inherits="Team4Mock.UserControl.Programme.ViewAll" %>
<style type="text/css">
    .style3
    {
        width: 233px;
    }
    .style4
    {
        width: 97px;
    }
    .style5
    {
        width: 173px;
    }
    h3
    {
        font-size: 17px;
        margin: 0px;
    }
</style>
<script type="text/javascript">
    function getContactID() {
        var s = document.getElementById('id').value;
        if (s != "") {
            document.getElementById('<%=idContact.ClientID%>').value = s;
        }
    }
    function PopupContact() {
        window.open("/FormView/PopupContact.aspx", 'popUpWindow', 'height=500,width=800,left=300,top=100,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
    }
    function Rediect() {
        alert("You do not have permission to on this page");
        window.location.href = "/FormView/Default.aspx";
    }
    function Error() {
        alert("Error in processing !");
        window.location.href = "/FormView/Default.aspx";
    }
    
</script>
<asp:Panel ID="pnView" runat="server">
    <div id="Directorate" class="tab_content">
        <fieldset style="margin-left: 0px; width: 740px;">
            <legend style="height: 25px; background-color: #465c71; -webkit-border-radius: 5px 5px 0px 0px;
                color: #dde4ec; font-size: 18px;">Programme List</legend>
            <div style="width: 550px; float: left; height: 32px; line-height: 32px; font-size: 15px;">
                <asp:LinkButton ID="All" runat="server" Text="All" OnClick="All_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton2" runat="server" Text="A-B-C-D-E" OnClick="LinkButton2_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton3" runat="server" Text="F-G-H-I-J" OnClick="LinkButton3_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton4" runat="server" Text="K-M-N-L" OnClick="LinkButton4_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton5" runat="server" Text="O-P-Q-R" OnClick="LinkButton5_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton6" runat="server" Text="S-T-U-V" OnClick="LinkButton6_Click"></asp:LinkButton>&nbsp;&nbsp;|
                <asp:LinkButton ID="LinkButton7" runat="server" Text="W-X-Y-Z" OnClick="LinkButton7_Click"></asp:LinkButton>
            </div>
            <div style="float: left; height: 32px; line-height: 32px;">
                &nbsp;
                <asp:Button ID="btnCreate" runat="server" Text="Create" CssClass="button" OnClick="btnCreate_Click" />&nbsp;
                <asp:CheckBox ID="ckactive" runat="server" AutoPostBack="true" Text="In-active" Style="font-size: 15px;"
                    OnCheckedChanged="ckactive_CheckedChanged" />
            </div>
            <div style="width: 784px;">
                <asp:UpdatePanel ID="pnanel" runat="server">
                    <ContentTemplate>
                        <asp:GridView ID="gvProgramme" AutoGenerateColumns="False" DataKeyNames="ID" runat="server"
                            Width="725px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC" AllowSorting="true"
                            BorderStyle="None" BorderWidth="1px" CellPadding="3" OnSorting="gvProgramme_Sorting">
                            <Columns>
                                <asp:TemplateField HeaderText="ID" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lbID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Programme Name" SortExpression="Name">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="OrgName" runat="server" NavigateUrl='<%#"/FormView/Programme.aspx?"+"ID="+Eval("ID") %>'
                                            Text='<%#Eval("Name") %>'></asp:HyperLink>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Description" SortExpression="Description">
                                    <ItemTemplate>
                                        <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("Description") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Contact" SortExpression="Contact">
                                    <ItemTemplate>
                                        <asp:Label ID="lbContact" runat="server" Text='<%#Eval("Contact") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Is Active">
                                    <ItemTemplate>
                                        <asp:Label ID="lbActive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" />
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <RowStyle ForeColor="#000066" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        <p style="width: 759px; background-color: lavender; line-height: 25px;">
                            <asp:Label ID="mess" runat="server" Style="font-size: 15px;"></asp:Label>
                        </p>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="All" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton2" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton3" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton4" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton5" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton6" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="LinkButton7" EventName="Click" />
                        <asp:AsyncPostBackTrigger ControlID="ckactive" EventName="CheckedChanged" />
                    </Triggers>
                </asp:UpdatePanel>
                <asp:UpdateProgress ID="pro" runat="server" AssociatedUpdatePanelID="pnanel">
                </asp:UpdateProgress>
            </div>
        </fieldset>
    </div>
</asp:Panel>
<asp:Panel ID="pnct" runat="server" Width="755px" Style="margin-left: 10px;">
    <h3>
        Programme Details</h3>
    <div style="width: 757px;">
        <ul class="tabs" style="width: 760px; float: left;">
            <li><a class="tab">Details</a></li>
        </ul>
        <br />
        <div class="tab_container">
            <div id="Details1" class="tab_content">
                <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                    <tr>
                        <td class="style5">
                            Programme Name <span style="color: Red;">(*)</span>
                        </td>
                        <td class="style3">
                            <asp:TextBox ID="txtProName" runat="server" Width="186px"></asp:TextBox>
                        </td>
                        <td class="style4">
                            Contact
                        </td>
                        <td class="style6">
                            <input type="text" id="Name" readonly="readonly" style="width: 104px" />
                            <input type="hidden" id="id" />
                            &nbsp;&nbsp; <a href="#" onclick="PopupContact();return false;">Lookup</a>
                            <asp:HiddenField ID="idContact" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style5">
                            Description
                        </td>
                        <td>
                            <asp:TextBox ID="txtDes" runat="server" Height="63px" Style="margin-left: 0px" TextMode="MultiLine"
                                Width="186px"></asp:TextBox>
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            <asp:CheckBox runat="server" ID="ckisactive" Text="Is Active?" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <asp:UpdatePanel ID="UpdatePanel11" runat="server">
            <ContentTemplate>
                <asp:Button ID="btnDel" runat="server" Text="Delete" CssClass="button" OnClick="btnDel_Click" />
                <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="button" OnClientClick="getContactID()"
                    OnClick="btnSave_Click" />
                <asp:Button ID="btnBack" runat="server" Text="Back" CssClass="button" OnClick="btnBack_Click" /><br />
                <p style="width: 750px; background-color: lavender; line-height: 25px;">
                    <asp:Label ID="tb" runat="server" Style="font-size: 15px;"></asp:Label>
                </p>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="btnDel" EventName="Click" />
                <asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
            </Triggers>
        </asp:UpdatePanel>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel11">
        </asp:UpdateProgress>
    </div>
</asp:Panel>
